//取cookies函数  
function getCookie(name){
       var cookieArray=document.cookie.split("; ");    
	   for (var i=0;i<cookieArray.length;i++){   
	      var arr=cookieArray[i].split("=");        
	      if(arr[0]==name){
	    	return unescape(arr[1]); 
	      }
	   }
	   return null;
	}
//删除cookies
function delCookie(name){
	var date = new Date();
	date.setTime(date.getTime() - 10000);
	document.cookie = name + "=a; expires=" + date.toGMTString(); 
	}

//设置Cookie的值
function setCookie(name,value,expires){	 
	 document.cookie = name + "="+ escape (value) + ";expires=" + expires.toGMTString();
}

//设置Cookie的值
function setCookie(name,value){	 
	 document.cookie = name + "="+ escape (value);
}

